<div class="user_box">
    <?php if ($this->boxType == 'simple') {
 ?>
        <a class="user-profile" href="/user/index/profile"><?php echo $this->userIdentity->firstname; ?> <?php echo $this->userIdentity->lastname; ?></a>&nbsp;&nbsp;&nbsp;<a class="user-logout" href="/user/index/logout">Logout</a>
<?php } elseif(!empty($this->userIdentity)) { ?>
        <div>Welcome, <b><?php echo $this->userIdentity->firstname; ?> <?php echo $this->userIdentity->lastname; ?></b></div>
        <div>You a member of group: <b><?php echo ucfirst($this->userIdentity->Role->name); ?></b></div>
        <div class="tool-bar">
            <a class="user-profile" href="<?php
        echo $this->url(array('action' => 'index', 'controller' => 'profile', 'module' => 'user'),
                'default',
                true); ?>">Profile</a><br>
                <a class="user-logout" href="/user/index/logout">Logout</a><br>
                <a class="user-change-password" href="/user/profile/change-password">Change password</a>
        </div>
<?php } ?>
</div>